/*
 * Viewport.h
 *
 *  Created on: 2009/01/19
 *      Author: elecgon
 */

#ifndef VIEWPORT_H_
#define VIEWPORT_H_

#ifndef PREREQUISITES_H_
#	include "core/Prerequisites.h"
#endif

#ifndef RECT2D_H_
#	include "core/Rect2D.h"
#endif


class Viewport
{
public:
	Viewport() {}
	Viewport(const int32 width, const int32 height);
	Viewport(const Rect2D& rect);
	Viewport(const Viewport& vp);

	virtual ~Viewport();

public:
	inline const Viewport& operator = (const Viewport& rhs)
	{
		mRect = Rect2D(rhs.getWidth(), rhs.getHeight());
		return *this;
	}
	inline const bool operator == (const Viewport& rhs)
	{
		return (getWidth() == rhs.getWidth() && getHeight() == rhs.getHeight());
	}
	inline const bool operator != (const Viewport& rhs)
	{
		return !(getWidth() == rhs.getWidth() && getHeight() == rhs.getHeight());
	}

	inline const float getWidth() const { return mRect.getWidth(); }
	inline const float getHeight() const { return mRect.getHeight(); }
	inline const Rect2D& getRect() const { return mRect; }

private:
	Rect2D		mRect;
};

#endif /* VIEWPORT_H_ */
